Micron Document
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| SparkN0de-git | SparkN0de |
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


Commit 9977e310f86488cf988d3eec78b59b589c85fa0c


Parents : 8d6cf7b
Author : Mark Qvist <bc7291552be7a58f361522990465165c>
Date : 2026-05-24T21:24:56+02:00

Fixed missing byteorder spec in nick color conversion for old snakes

Changes

1 files changed, 1 insertions(+), 1 deletions(-)


Diff

diff --git a/nomadnet/ui/textui/Channels.py b/nomadnet/ui/textui/Channels.py
index 6a02747..3fe6d7b 100644
--- a/nomadnet/ui/textui/Channels.py
+++ b/nomadnet/ui/textui/Channels.py
@@ -1232,7 +1232,7 @@ def get_nick_color(sender_hash, theme, app, shift=15):
try: sender_hash = sender_hash.encode("utf-8")
except: pass
if not type(sender_hash) == bytes: return theme["nick_peer"]
- return nick_colors[(int.from_bytes(sender_hash)+shift)%len(nick_colors)]
+ return nick_colors[(int.from_bytes(sender_hash, "big")+shift)%len(nick_colors)]
room_nick_src_cache = {}
def get_nick_src(hub, room, nick):


──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────